package top.hzy520.personalblog.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import top.hzy520.personalblog.po.Tag;

import java.util.List;

public interface TagsRepository extends JpaRepository<Tag,Long> {
    Tag findTagByName(String name);
    @Query("select t from Tag  t")
    List<Tag> findTop(Pageable pageable);
}
